﻿using System;
using System.Diagnostics;
using System.Runtime.InteropServices;

namespace 双人对战游戏服务端
{
    public class EventHandler
    {
        public static void OnDisconnect(ClientState c)
        {
 
            string desc = c.socket.RemoteEndPoint.ToString();
            string sendStr = "Leave|" + desc + ",";
            Console.WriteLine(sendStr);
            foreach (ClientState cs in Program.clients.Values)
            {
                Program.Send(cs,sendStr);
            }
        }
    }
}